Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gcc error for argument mismatch #303

Closed
wants to merge 1 commit into from

Conversation

wortiz
Copy link
Contributor

@wortiz wortiz commented May 11, 2022

GCC 12 has a new argument mismatch, though they didn't say they changed anything regarding Fortran for porting

I think this fix is okay as those look like dummy arguments but my fortran is very rusty

blot still seems to work

/home/wortiz/.local/opt/seacas/packages/seacas/applications/blot/mscomd.f:948:48:

  485 |             CALL SCOLOR (.TRUE., CDUM, IDUM, IDUM, RDUM, IDUM,
      |                                             2
......
  948 |             CALL SCOLOR (.FALSE., INLINE, IFLD, INTYP,
      |                                                1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
/home/wortiz/.local/opt/seacas/packages/seacas/applications/blot/mscomd.f:949:15:

  485 |             CALL SCOLOR (.TRUE., CDUM, IDUM, IDUM, RDUM, IDUM,
      |                                                   2
......
  949 |      &         RFIELD, IFIELD, CFIELD, SHDCOL, ISHDCL, IDELB)
      |               1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
/home/wortiz/.local/opt/seacas/packages/seacas/applications/blot/mscomd.f:949:23:

  485 |             CALL SCOLOR (.TRUE., CDUM, IDUM, IDUM, RDUM, IDUM,
      |                                                         2
......
  949 |      &         RFIELD, IFIELD, CFIELD, SHDCOL, ISHDCL, IDELB)
      |                       1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[2]: *** [packages/seacas/applications/blot/CMakeFiles/blotlib.dir/build.make:2324: packages/seacas/applications/blot/CMakeFiles/blotlib.dir/mscomd.f.o] Error 1

@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@wortiz
Copy link
Contributor Author

wortiz commented May 11, 2022

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request May 11, 2022
@gsjaardema
Copy link
Member

Thank you for the PR. I don't seen anything wrong with your fix, but it does use the somewhat esoteric [var] syntax which can cause fortran users to have to do a double take. I will implement a different fix which should eliminate the warnings, but use a more standard syntax. Basically, not pass in the dummy variables but pass in the same argumenta as a later call to scolor which will not be accessed since the init argument is true. They have the correct arrayness

@gsjaardema gsjaardema closed this May 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2022
@wortiz wortiz deleted the blot_gcc12_error branch May 16, 2022 14:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants